<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
	<%@ page isELIgnored="false" %>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>  
<!DOCTYPE html>
<%
	String path = request.getContextPath();
%>
<html>
<head>

<link rel="stylesheet" type="text/css"
	href="<%=path%>/script/easyUI-1.4/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css"
	href="<%=path%>/script/easyUI-1.4/themes/icon.css">
<script type="text/javascript"
	src="<%=path%>/script/easyUI-1.4/jquery-3.2.1.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/script/easyUI-1.4/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/script/easyUI-1.4/locale/easyui-lang-zh_CN.js"></script>
</head>
<script type="text/javascript">

	function desc(articleId){
		top.location.href="<%=path%>/guancangAction/articleDescView?articleId="+articleId;
	}
</script>



<body>   
  
  	<c:forEach items="${articleList}" var="article">
  		<div>
  			<font size="5px" color="#030303" onclick="desc(${article.id})" style="font-family:verdana;font-weight:bold">${article.title}</font><br /><br />
                   <c:choose>
					   <c:when test="${fn:length(article.content)>50 }">    
					   		 <font size="3px;" color="grey">${fn:substring(article.content, 0, 50)}... </font> 
					   </c:when>
					   <c:otherwise>  
					   		<font size="3px;" color="grey">${fn:substring(article.content, 0, 50)} </font> 
					   </c:otherwise>
					</c:choose>
                   
  			<br /><br />
  			<font size="2px;" color="#CDC8B1">${article.createTime}</font>
  			<font size="2px;" color="#CDC8B1">收藏：${article.shoucangMount}</font>
  			<font size="2px;" color="#CDC8B1">评论：${article.pinglunMount}</font>
  		</div>
  		
  		<hr>
  	</c:forEach>
  
</body>  

</html>